/// <reference path="jquery-1.10.1.min.js" />
/// <reference path="ProtoClass.js" />
/// <reference path="jquery-ui-1.10.3.custom.min.js" />
/// <reference path="classes.js" />

var telerik = new Company("Telerik", 300000000);

var firstBranch = new Branch("Sofia", 250000);

var administrativeBuilding = new AdministrativeBuilding("Main building", 1500, 10000000, false);
administrativeBuilding.addWorker(new Manager("Vasil", "Terziev", 35, 15, "Computer Science"));
administrativeBuilding.addWorker(new Manager("Svetozar", "Georgiev", 36, 16, "Computer Science"));
administrativeBuilding.addWorker(new Expert("Chavdar", "Stoyanov", 31, 9, "Informatics"));
administrativeBuilding.addWorker(new Worker("Ivan", "Veliov", 42, 11));
administrativeBuilding.addWorker(new Worker("Karaman", "Tsatsarov", 36, 16));

var productionBuilding = new ProductionBuilding("Inventory building", 2500, 200000, false);
productionBuilding.addWorker(new Worker("Ivelin", "Popov", 60, 30));
productionBuilding.addMachine(new Server(2, 3, 5, 12, "Linux", "data analytics"));
productionBuilding.addMachine(new Server(1, 3, 5, 8, "Windows Server", "QA Testing"));
productionBuilding.addVehicle(new Vehicle(1, 5, 12, 2500, false, "Bager"));

firstBranch.addBuilding(administrativeBuilding);
firstBranch.addBuilding(productionBuilding);

telerik.addBranch(firstBranch);

productionBuilding.addVehicle(new Vehicle(2, 3, 10, 10000, false, "Lamborghini"));

var academyBranch = new Branch("Academy", 5000);

var academyBuilding = new AdministrativeBuilding("Svatben Mall", 1600, 2000000, true, 200000);
academyBuilding.addWorker(new Manager("Svetlin", "Nakov", 32, 18, "Informatics"));
academyBuilding.addWorker(new Expert("Doncho", "Minkov", 23, 5, "Software Engineering"));
academyBuilding.addWorker(new Expert("Nikolay", "Kostov", 22, 5, "Computer Science"));
academyBuilding.addWorker(new Expert("Georgi", "Georgiev", 22, 2, "Software Engineering"));
academyBuilding.addWorker(new Worker("Ina", "Dobrilova", 25, 2));
academyBuilding.addWorker(new Worker("Stamo", "Gochev", 22, 2));

academyBranch.addBuilding(academyBuilding);

$(document.body).append(telerik.renderPartial());

telerik.addBranch(academyBranch);